package com.elite.controller;

import com.elite.security.web.RouterSingleFilterChain;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * @description:
 * @Author 万伟焕
 * @Date 2024-01-29 15:24:36
 **/
@Controller
public class CsrfController{


	@PostMapping("/csrf")
	@ResponseBody
	public String csrf() throws Exception {

		return "csrf Spring Security";
	}

	@GetMapping ("/index")
	public String index() throws Exception {

		return "index";
	}
}
